<!--外啮合齿轮强度校核-->
<template>
  <div class="all" style="overflow-x: hidden;overflow-y: hidden;display: flex">
    <div class="all_row" style="display:flex;width: 100%;height: 100%">
      <div class="left_col">
        <div class="left_col_1 " style="font-size: 17.5px;background-color: #D7D7D7;border-radius: 3px;padding-left: 3%;font-weight: bolder;">参数</div>
        <div class="left_col_2" style="display: flex">
          <div class="left_col_2_1">
            <div class="left_col_2_1_1">
              <img style="width: 25%;height: 100%;margin-left: 40%" src="../../../assets/image/image_06_1.png"/>
            </div>
            <div class="left_col_2_1_2">
              <div class="left_col_2_1_2_1">齿轮材料基本参数</div>
              <div class="left_col_2_1_2_2" style="display: flex;list-style-type: none">
                <div class="left_col_2_1_2_2_1">
                  <ul class="text6">
                    <li class="text6_1">材料类型</li>
                    <li class="text6_1">屈服应力(MPa)</li>
                    <li class="text6_1">接触疲劳极限应力(Mpa)</li>
                    <li class="text6_1">弯曲疲劳极限应力(Mpa)</li>
                    <li class="text6_1">齿面硬度(HB)</li>
                    <li class="text6_1">弹性模量(MPa)</li>
                    <li class="text6_1">泊松比</li>
                    <li>
                      <span  v-show="form.calculate_KV==1" class="text6_1">密度(kg/m^3)</span>
                    </li>
                  </ul>
                </div>
                <div class="left_col_2_1_2_2_2">
                  <ul class="text7">
                    <li>小轮</li>
                    <li>
                      <select  v-model="form.material_type_p">
                        <option value="1">渗碳淬火</option>
                        <option value="2">调质</option>
                        <option value="3">渗氮钢</option>
                        <option value="4">结构钢</option>
                        <option value="5">感应淬火和火焰淬火钢</option>
                        <option value="6">氮碳共渗钢</option>
                      </select>
                    </li>
                    <li><input v-model="form.sigma_s_p"/></li>
                    <li><input v-model="form.sigma_Hlim_p"/></li>
                    <li><input v-model="form.sigma_Flim_p"/></li>
                    <li><input v-model="form.hardness_HB_p"/></li>
                    <li><input v-model="form.E_p"/></li>
                    <li><input v-model="form.possion_p"/></li>
                    <li>
                      <span   v-show="form.calculate_KV==1" ><input v-model="form.density_p"/></span>
                    </li>
                  </ul>
                </div>
                <div class="left_col_2_1_2_2_3">
                  <ul class="text8">
                    <li>大轮</li>
                    <li>
                      <select v-model="form.material_type_w">
                        <option value="1">渗碳淬火</option>
                        <option value="2">调质</option>
                        <option value="3">渗氮钢</option>
                        <option value="4">结构钢</option>
                        <option value="5">感应淬火和火焰淬火钢</option>
                        <option value="6">氮碳共渗钢</option>
                      </select>
                    </li>
                    <li><input v-model="form.sigma_s_w"/></li>
                    <li><input v-model="form.sigma_Hlim_w"/></li>
                    <li><input v-model="form.sigma_Flim_w"/></li>
                    <li><input v-model="form.hardness_HB_w"/></li>
                    <li><input v-model="form.E_w"/></li>
                    <li><input v-model="form.possion_w"/></li>
                    <li>
                      <span   v-show="form.calculate_KV==1" ><input v-model="form.density_w"/></span>
                    </li>
                  </ul>
                </div>
              </div>
            </div>
          </div>
          <div class="left_col_2_2">
            <div class="left_col_2_2_1">齿形参数输入</div>
            <div class="left_col_2_2_2" style="display: flex">
              <div class="left_col_2_2_2_1">
                <ul class="text9">
                  <li>齿顶高系数</li>
                  <li>顶隙系数</li>
                  <li>齿根圆角半径系数</li>
                  <li>轮缘厚度系数</li>
                  <li>齿向倒角高度(直径)(mm)</li>
                  <li>齿向倒角角度(°)</li>
                  <li>齿顶削减量(直径)(mm)</li>
                  <li>挖根量(mm)</li>
                  <li>齿面粗糙度Rz(um)</li>
                  <li>齿根圆角粗糙度Rz (um)</li>
                  <li>齿厚上偏差(um)</li>
                  <li>齿厚公差(um)</li>
                  <li>弯曲强度计算齿厚值(um)</li>
                  <li>
                    <span    v-if="form.calculate_KV==1||form.calculate_KHb==1||form.calculate_KHa==1||form.calculate_KFa==1">精度等级</span>
                  </li>
                </ul>
              </div>
              <div class="left_col_2_2_2_2">
                <ul class="text10">
                  <li>小轮</li>
                  <li><input v-model="form.ad_factor_p"/></li>
                  <li><input v-model="form.tip_factor_p"/></li>
                  <li><input v-model="form.radius_factor_p"/></li>
                  <li><input v-model="form.SR_p"/></li>
                  <li><input v-model="form.chamfer_dia_p"/></li>
                  <li><input v-model="form.chamfer_angle_p"/></li>
                  <li><input v-model="form.ad_cut_dia_p"/></li>
                  <li><input v-model="form.undercut_p"/></li>
                  <li><input v-model="form.R_z_flank_p"/></li>
                  <li><input v-model="form.R_z_root_p"/></li>
                  <li><input v-model="form.thickness_reduction_p"/></li>
                  <li><input v-model="form.tooth_thickness_tolerance_p"/></li>
                  <li><span>{{ans.thickness_reduction_last_p}}</span>
                    <select v-model="form.bend_strength_thickness_p">
                      <option value="1">最小</option>
                      <option value="2">平均</option>
                      <option value="3">最大</option>
                    </select></li>
                  <li>
                    <span v-if="form.calculate_KV==1||form.calculate_KHb==1||form.calculate_KHa==1||form.calculate_KFa==1">
                      <select v-model="form.quality_grade_p">
                      <option value="0">0</option>
                      <option value="1">1</option>
                      <option value="2">2</option>
                      <option value="3">3</option>
                      <option value="4">4</option>
                      <option value="5">5</option>
                      <option value="6">6</option>
                      <option value="7">7</option>
                      <option value="8">8</option>
                      <option value="9">9</option>
                      <option value="10">10</option>
                      <option value="11">11</option>
                      <option value="12">12</option>
                    </select>
                    </span>
                  </li>
                </ul>
              </div>
              <div class="left_col_2_2_2_3">
                <ul class="text11">
                  <li>大轮</li>
                  <li><input v-model="form.ad_factor_w"/></li>
                  <li><input v-model="form.tip_factor_w"/></li>
                  <li><input v-model="form.radius_factor_w"/></li>
                  <li><input v-model="form.SR_w"/></li>
                  <li><input v-model="form.chamfer_dia_w"/></li>
                  <li><input v-model="form.chamfer_angle_w"/></li>
                  <li><input v-model="form.ad_cut_dia_w"/></li>
                  <li><input v-model="form.undercut_w"/></li>
                  <li><input v-model="form.R_z_flank_w"/></li>
                  <li><input v-model="form.R_z_root_w"/></li>
                  <li><input v-model="form.thickness_reduction_w"/></li>
                  <li><input v-model="form.tooth_thickness_tolerance_w"/></li>
                  <li><span>{{ans.thickness_reduction_last_w}}</span>
                    <select v-model="form.bend_strength_thickness_w">
                      <option value="1">最小</option>
                      <option value="2">平均</option>
                      <option value="3">最大</option>
                    </select></li>
                  <li>
                    <span  v-if="form.calculate_KV==1||form.calculate_KHb==1||form.calculate_KHa==1||form.calculate_KFa==1">
                      <select  v-model="form.quality_grade_w">
                      <option value="0">0</option>
                      <option value="1">1</option>
                      <option value="2">2</option>
                      <option value="3">3</option>
                      <option value="4">4</option>
                      <option value="5">5</option>
                      <option value="6">6</option>
                      <option value="7">7</option>
                      <option value="8">8</option>
                      <option value="9">9</option>
                      <option value="10">10</option>
                      <option value="11">11</option>
                      <option value="12">12</option>
                    </select>
                    </span>
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </div>
        <div class="left_col_3">
          <div class="left_col_3_1">载荷及相关数据输入</div>
          <div class="left_col_3_2" style="display: flex">
            <div class="left_col_3_2_1">
              <div class="left_col_3_2_1_1" style="display: flex">
                <div class="left_col_3_2_1_1_1">
                  <ul class="text12">
                    <li style="height: 18%">
                      <span style="width: 100%;height: 100%" v-show="form.whether_rate_load==1">小齿轮额定转速(rpm)</span>
                    </li>
                    <li>运行工况</li>
                    <li>允许点蚀</li>
                    <li>接触长寿命系数</li>
                    <li>弯曲长寿命系数</li>
                    <li>设计载荷输入形式</li>
                  </ul>
                </div>
                <div class="left_col_3_2_1_1_2">
                  <ul class="text13">
                    <li style="height: 18%">
                      <span style="width: 100%;height: 100%" v-show="form.whether_rate_load==1"><input v-model="form.n_p"/></span>
                    </li>
                    <li>
                      <select v-model="form.whether_single_rotation">
                        <option value="1">单向运转</option>
                        <option value="2">双向运转</option>
                      </select>
                    </li>
                    <li>
                      <select v-model="form.switch_pitting">
                        <option value="1">是</option>
                        <option value="2">否</option>
                      </select></li>
                    <li><input v-model="form.Znt_Longlife"/></li>
                    <li><input v-model="form.Ynt_Longlife"/></li>
                    <li>
                      <select v-model="form.whether_rate_load">
                        <option value="1">额定工况</option>
                        <option value="2">载荷谱</option>
                      </select>
                    </li>
                  </ul>
                </div>
              </div>
              <div v-show="form.whether_rate_load==1" class="left_col_3_2_1_2" style="display: flex;">
                <div class="left_col_3_2_1_2_1">
                  <ul class="text23">
                    <li>小齿轮额定形式(Nmm)</li>
                    <li v-show="form.whether_power==1">扭矩(KW)</li>
                    <li v-show="form.whether_power==2">功率(KW)</li>
                    <li>设计寿命(hr)</li>
                  </ul>
                </div>
                <div class="left_col_3_2_1_2_2">
                  <ul  class="text22">
                    <li>
                      <select v-model="form.whether_power">
                        <option value="1">输入扭矩</option>
                        <option value="2">输入功率</option>
                      </select>
                    </li>
                    <li><input v-model="form.spectrum_power"/></li>
                    <li><input v-model="form.spectrum_time"/></li>
                  </ul>
                </div>
              </div>
              <div v-show="form.whether_rate_load==2" class="left_col_3_2_1_2">
                <a-upload :showUploadList="false" :maxCount="1" :customRequest="customRequest" name="file">
                  <button style="margin-left:52.5%;height:25%;width:100%;">导入小轮载荷谱</button>
                </a-upload>
                <table style="width: 100%;text-align: center;background-color:#F2F2F2">
                  <tr style="width: 100%;height:70%;background-color:#EAEAEA">
                    <th class="text24">序号</th>
                    <th class="text24">扭矩(Nmm)</th>
                    <th class="text24">循环次数</th>
                    <th class="text24">转速(rpm)</th>
                  </tr>
                  <tr v-for="(item,index) in this.items" :key="index">
                    <td>{{item[0]}}</td>
                    <td>{{item[1]}}</td>
                    <td>{{item[2]}}</td>
                    <td>{{item[3]}}</td>
                  </tr>
                </table>
              </div>
              <div class="left_col_3_2_1_2_1">
              </div>
            </div>
            <div class="left_col_3_2_2">
              <ul class="text14">
                <li>使用系数</li>
                <li>动载系数</li>
                <li>接触齿向载荷分布系数</li>
                <li>接触齿间载荷分布系数</li>
                <li>弯曲齿向载荷分布系数</li>
                <li>弯曲齿向载荷分布系数</li>
              </ul>
            </div>
            <div class="left_col_3_2_3">
              <ul class="text15">
                <li><input v-model="form.K_A"/></li>
                <li>
                  <span v-if="form.user_defined_KV==1">
                    <input v-model="form.K_V_constant"/>
                  </span>
                </li>
                <li >
                  <span  v-if="form.user_defined_KHb==1">
                    <input v-model="form.K_Hb_constant"/>
                  </span>
                </li>
                <li >
                  <span  v-if="form.user_defined_KHa==1">
                    <input v-model="form.K_Ha_constant"/>
                  </span>
                </li>
                <li >
                  <span  v-if="form.user_defined_KFb==1">
                    <input v-model="form.K_Fb_constant"/>
                  </span>
                </li>
                <li >
                  <span  v-if="form.user_defined_KFa==1">
                    <input v-model="form.K_Fa_constant"/>
                  </span>
                </li>
              </ul>
            </div>
            <div class="left_col_3_2_4" style="font-size: 12.5px">
              <ul class="text25" style="margin-top: 14%">
                <li style="margin-top: -12%;margin-bottom: 10%">
                  <div>
                    <button @click="showModal1">!</button>
                    <a-modal
                        title="使用系数参考表"
                        :visible="visible1"
                        @ok="handleOk1"
                        @cancel="handleCancel1"
                    >
                      <img  style="width: 90%" src="../../../assets/image/image_06_2.png">
                    </a-modal>
                  </div>
                </li>
                <li style="display: flex">
                    <span>
                    <p style="width:80px"><label ><input style="width: 12px;height: 12px" v-model="form.user_defined_KV" name="btn2" type="radio" value="1" @click="text1">用户输入</label></p>
                   <p style="width:80px"><label ><input style="width: 12px;height: 12px" v-model="form.calculate_KV" name="btn2" type="radio" value="1" @click="text2" >程序计算</label></p>
                  </span>
                  <span>
                      <div>
                      <button style="width:100%" @click="showModal2">!</button>
                      <a-modal
                          title="动载系数参考表"
                          :visible="visible2"
                          @ok="handleOk2"
                          @cancel="handleCancel2"
                      >
                        <img  style="width: 90%" src="../../../assets/image/image_06_3.png">
                      </a-modal>
                    </div>
                    </span>
                </li>
                <li style="display: flex">
                    <span>
                      <p style="width:80px"><label><input style="width: 12px;height: 12px" v-model="form.user_defined_KHb" name="btn3" type="radio" value="1" @click="text3" >用户输入</label></p>
                      <p style="width:80px"><label><input style="width: 12px;height: 12px" v-model="form.calculate_KHb" name="btn3" type="radio" value="1"  @click="text4">程序计算</label></p>
                  </span>
                </li>
                <li style="display: flex">
                    <span>
                      <p style="width:80px"><label><input style="width: 12px;height: 12px" v-model="form.user_defined_KHa" name="btn4" type="radio" value="1" @click="text5" >用户输入</label></p>
                     <p style="width:80px"><label><input style="width: 12px;height: 12px" v-model="form.calculate_KHa" name="btn4" type="radio" value="1" @click="text6">程序计算</label></p>
                  </span>
                  <span>
                      <div>
                      <button style="width:100%" @click="showModal3">!</button>
                      <a-modal
                          title="齿间载荷分配系数参考表"
                          :visible="visible3"
                          @ok="handleOk3"
                          @cancel="handleCancel3"
                      >
                        <img  style="width: 90%" src="../../../assets/image/image_06_4.png">
                      </a-modal>
                    </div>
                    </span>
                </li>
                <li style="display: flex">
                    <span>
                      <p style="width:80px"><label ><input style="width: 12px;height: 12px" v-model="form.user_defined_KFb" name="btn5" type="radio" value="1" @click="text7">用户输入</label></p>
                      <p style="width:80px"><label ><input style="width: 12px;height: 12px" v-model="form.calculate_KFb" name="btn5" type="radio" value="1" @click="text8">程序计算</label></p>
                  </span>
                </li>
                <li style="display: flex">
                    <span>
                      <p style="width:80px"><label ><input  style="width: 12px;height: 12px" v-model="form.user_defined_KFa" name="btn6" type="radio" value="1" @click="text9">用户输入</label></p>
                      <p style="width:80px"><label ><input  style="width: 12px;height: 12px" v-model="form.calculate_KFa" name="btn6" type="radio" value="1" @click="text10">程序计算</label></p>
                  </span>
                  <span>
                      <div>
                      <button style="width:100%" @click="showModal4">!</button>
                      <a-modal
                          title="齿间载荷分配系数参考表"
                          :visible="visible4"
                          @ok="handleOk4"
                          @cancel="handleCancel4"
                      >
                        <img  style="width: 90%" src="../../../assets/image/image_06_5.png">
                      </a-modal>
                    </div>
                    </span>
                </li>

              </ul>
            </div>
            <div class="left_col_3_2_5">
              <ul class="text16">
                <li>润滑油类型</li>
                <li>润滑油40C粘度(mm^2/s)</li>
                <li v-if="form.calculate_KHb==1">小齿轮轴当量外径(mm)</li>
                <li v-if="form.calculate_KHb==1">小齿轮轴结构形式</li>
                <li v-if="form.calculate_KHb==1">小齿轮轴承跨距(mm)</li>
                <li v-if="form.calculate_KHb==1" style="font-size: 0.5px">小齿轮齿宽中点至轴承跨距中心距离(mm)</li>
                <li v-if="form.calculate_KHb==1">齿向修形类型</li>
                <li v-if="form.calculate_KHb==1">齿面接触印痕状况</li>
              </ul>
            </div>
            <div class="left_col_3_2_6">
              <ul class="text17" style="margin-top: 9%;width: 100%;height: 100%">
                <li>
                  <select v-model="form.oil_type">
                    <option value="1">矿物油</option>
                    <option value="2">合成油</option>
                  </select>
                </li>
                <li><input v-model="form.v_40"/></li>
                <li v-if="form.calculate_KHb==1"><input v-model="form.dsh"/></li>
                <li v-if="form.calculate_KHb==1" style="display: flex;">
                    <span>
                      <select style="width:175%">
                      <option value="1">a</option>
                      <option value="2">b</option>
                      <option value="3">c</option>
                      <option value="4">d</option>
                      <option value="5">e</option>
                    </select>
                    </span>
                  <span style="margin-left: 20px">
                      <div>
                      <button  style="width: 16px; margin-left:20%;background-color:#D7D7D7;border-radius:4px;border: 2px #686868;" @click="showModal6">!</button>
                      <a-modal
                          title="小齿轮轴结构形式参考图"
                          :visible="visible6"
                          @ok="handleOk6"
                          @cancel="handleCancel6"
                      >
                        <img  style="height: 50%;width: 20px;" src="../../../assets/image/image_06_6.png">
                      </a-modal>
                    </div>
                    </span>
                </li>
                <li v-if="form.calculate_KHb==1"><input v-model="form.L"/></li>
                <li v-if="form.calculate_KHb==1"><input v-model="form.s"/></li>
                <li v-if="form.calculate_KHb==1">
                  <select>
                    <option value="1">1.无修行</option>
                    <option value="2">2.仅修鼓，修形量0.5*fma</option>
                    <option value="3">3.仅修鼓，修形量0.5*(fma+fsh)</option>
                    <option value="4">4.螺旋线修形</option>
                    <option value="5">5.螺旋线修形+修鼓(case2+case4)</option>
                    <option value="6">6.齿端倒坡</option>
                  </select>
                </li>
                <li v-if="form.calculate_KHb==1">
                  <select>
                    <option value="1">未能验证有良好接触</option>
                    <option value="2">达到期望的接触斑点，例如采用齿向修形等方式使变形和误差相互补偿.</option>
                    <option value="3">达到理性的接触斑点</option>
                  </select>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
      <div class="right_col">
        <div class="right_col_1">
          <div class="right_col_1_1">宏观参数输入</div>
          <div class="right_col_1_2" style="display: flex">
            <div class="right_col_1_2_1">
              <ul class="text18">
                <li>设计法向模数(mm)</li>
                <li>设计齿数</li>
                <li>设计法向压力角(°)</li>
                <li>设计螺旋角(°)</li>
                <li>设计中心距(mm)</li>
                <li>设计法向变位系数</li>
                <li>设计齿宽(mm)</li>
                <li>
                  <span v-if="form.calculate_KV==1||form.calculate_KHb==1||form.calculate_KHa==1||form.calculate_KFa==1">辐板厚度(mm)</span>
                </li>
                <li>
                  <span v-show="form.calculate_KV==1">轮缘内径(mm)</span>
                </li>
              </ul>
            </div>
            <div class="right_col_1_2_2">
              <ul class="text19" style="width:110%">
                <li style="margin-left: 15%">
                  <span style="margin-left: 5%">小轮</span>
                  <span style="margin-left: 20%">大轮</span>
                </li>
                <li style="margin-left: 15%"><input v-model="form.normal_module" style="width:50%"/></li>
                <li style="margin-left: 15%">
                  <span style="width:25%;margin-right: 10%"><input v-model="form.z_p" style="width: 20%"/></span>
                  <span  style="width:25%"><input v-model="form.z_w" style="width: 20%"/></span>
                </li>
                <li style="margin-left: 15%"><input v-model="form.press_angle" style="width:50%"/></li>
                <li style="margin-left: 15%"><input v-model="form.helix_angle" style="width:50%"/></li>
                <li style="margin-left: 15%"><input v-model="form.work_center" style="width:50%"/></li>
                <li style="margin-left: 15%">
                  <span style="width:25%;margin-right: 10%"><input v-model="form.normal_modi_factor_p" style="width: 20%"/></span>
                  <span style="width:25%">{{ans.normal_modi_factor_w}}</span>
                </li>
                <li style="margin-left: 15%"><input v-model="form.width_p" style="width:50%"/></li>
                <li v-if="form.calculate_KV==1||form.calculate_KHb==1||form.calculate_KHa==1||form.calculate_KFa==1" style="margin-left: 15%">
                  <span style="width:25%;margin-right: 10%"><input v-model="form.web_thickness_p" style="width: 20%"/></span>
                  <span  style="width:25%"><input v-model="form.web_thickness_w" style="width: 20%"/></span>
                </li>
                <li v-show="form.calculate_KV==1" style="margin-left: 15%;display: flex">
                  <span style="width:20%;margin-right: 10%"><input v-model="form.D_p" style="width: 100%"/></span>
                  <span  style="width:20%"><input v-model="form.D_w" style="width:100%"/></span>
                  <span style="width:20%;margin-left: 5%">
                    <div>
                      <button style="width: 50%" @click="showModal5">!</button>
                      <a-modal
                          title="齿间载荷分配系数参考表"
                          :visible="visible5"
                          @ok="handleOk5"
                          @cancel="handleCancel5"
                      >
                        <img  style="width: 90%" src="../../../assets/image/image_06_7.png">
                      </a-modal>
                    </div>
                  </span>
                </li>
              </ul>
            </div>
          </div>
          <div class="right_col_1_3">
            <button style="margin-left:2%;margin-top:1%;width:16%;background-color:#D7D7D7;border-radius: 4px;border: 2px #686868;" @click="tclick">计算</button>
          </div>
        </div>
        <div class="right_col_2">
          <div class="right_col_2_1">齿轮疲劳强度校核结果</div>
          <div class="right_col_2_2" style="display: flex">
            <div class="right_col_2_2_1">
              <ul class="text20">
                <li>小齿弯曲疲劳安全系数(正转)</li>
                <li>小齿接触疲劳安全系数(正转)</li>
                <li>大齿弯曲疲劳安全系数(正转)</li>
                <li>大齿接触疲劳安全系数(正转)</li>
                <li>小齿弯曲疲劳安全系数(反转)</li>
                <li>小齿接触疲劳安全系数(反转)</li>
                <li>大齿弯曲疲劳安全系数(反转)</li>
                <li>大齿接触疲劳安全系数(反转)</li>
              </ul>
            </div>
            <div class="right_col_2_2_2" >
              <ul class="text21">
                <li>{{ans.safe_F_damage_p_positive}}</li>
                <li>{{ans.safe_H_damage_p_positive}}</li>
                <li>{{ans.safe_F_damage_w_positive}}</li>
                <li>{{ans.safe_H_damage_w_positive}}</li>
                <li>{{ans.safe_F_damage_p_negative}}</li>
                <li>{{ans.safe_F_damage_w_negative}}</li>
                <li>{{ans.safe_H_damage_p_negative}}</li>
                <li>{{ans.safe_H_damage_w_negative}}</li>
              </ul>
            </div>
          </div>
        </div>
        <div class="right_col_3" style="margin-left: 2%;margin-right: 2%;margin-top:1%;height: 20%;width: 95%;background-color:#F2F2F2">
          <table style="width: 100%;height:20%;text-align: center;border-radius:3px;background-color:#F2F2F2">
            <tr style="width: 100%;height:100%;background-color:#EAEAEA">
              <th class="text5">序号</th>
              <th class="text4">动载系数</th>
              <th class="text4">接触齿向载荷分布系数</th>
              <th class="text4">接触齿间载荷分布系数</th>
              <th class="text4">弯曲齿向载荷分布系数</th>
              <th class="text4">弯曲齿间载荷分布系数</th>
            </tr>
          </table>
          <div style="display: flex;width: 100%">
            <div v-show="ans.flag==1" class="text26">
              <td>1</td>
              <td>{{ans.K_V_vector_negative}}</td>
              <td>{{ans.K_Hb_vector_negative}}</td>
              <td>{{ans.K_Ha_vector_negative}}</td>
              <td>{{ans.K_Fb_vector_negative}}</td>
              <td>{{ans.K_Fa_vector_negative}}</td>
            </div>
            <div v-show="ans.flag==2" class="text26">
              <td style="width: 10%">1</td>
              <td>{{ans.K_V_vector_positive}}</td>
              <td>{{ans.K_Hb_vector_positive}}</td>
              <td>{{ans.K_Ha_vector_positive}}</td>
              <td>{{ans.K_Fb_vector_positive}}</td>
              <td>{{ans.K_Fa_vector_positive}}</td>
            </div>
            <div v-show="ans.flag==3" class="text26">
              <td>1</td>
              <td>{{ans.K_V_vector_total}}</td>
              <td>{{ans.K_Hb_vector_total}}</td>
              <td>{{ans.K_Ha_vector_total}}</td>
              <td>{{ans.K_Fb_vector_total}}</td>
              <td>{{ans.K_Fa_vector_total}}</td>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>


import { firetext,firedelete, parallel_external_fatiguesafe_check } from "@/api/file";

export default {
  created() {
    document.title='外啮合齿轮强度校核'
    this.$store.state.file.key = 6 //设置key为自己的页面编号
  },
  name: "外啮合齿轮强度校核",
  mounted(){
    //绑定页面退出事件
    window.onbeforeunload= (e)=>{
      e = e || window.event;
      if (e) {
        e.returnValue = '关闭提示';
      }
      this.delete()//调用自己的方法
      // Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+
      return '关闭提示';
    };
  },
  methods:
      {
        async delete(){
          this.form2.uuids=this.form2.uuids.toString();//将载荷谱文件数组转成字符串
          await firedelete(this.form2).then(res => {
            console.log(res);
          })
        },

        customRequest(data){
          const formData = new FormData()
          formData.append( 'fileName' , data.file)
          firetext(formData)
              .then(res => {//这里需要用箭头函数，如果不用箭头函数里面的 this 就不是外面那个 this
                console.log(res)
                this.items=res.data.filedata;
                this.form.uuid=res.data.uuid;
                this.form2.uuids.push(res.data.uuid);
              })
              .catch(error => {
                console.log(error)
              })
        },
        tclick() {
          parallel_external_fatiguesafe_check(this.form)
              .then(res => {
                console.log("打印结果");
                console.log(res);
                this.ans.flag=res[0];
                this.ans.K_V_vector_positive=res[1];
                this.ans.K_Hb_vector_positive=res[2];
                this.ans.K_Ha_vector_positive=res[3];
                this.ans.K_Fb_vector_positive=res[4];
                this.ans.K_Fa_vector_positive=res[5];
                this.ans.thickness_reduction_last_p=res[6];
                this.ans.thickness_reduction_last_w=res[7];
                this.ans.safe_F_damage_p_positive=res[8];
                this.ans.safe_F_damage_w_positive=res[10];
                this.ans.safe_H_damage_p_positive=res[12];
                this.ans.safe_H_damage_w_positive=res[14];
                this.ans.K_V_vector_negative=res[16];
                this.ans.K_Hb_vector_negative=res[17];
                this.ans.K_Ha_vector_negative=res[18];
                this.ans.K_Fb_vector_negative=res[19];
                this.ans.K_Fa_vector_negative=res[20];
                this.ans.safe_F_damage_p_negative=res[21];
                this.ans.safe_F_damage_w_negative=res[23];
                this.ans.safe_H_damage_p_negative=res[25];
                this.ans.safe_H_damage_w_negative=res[27];
                this.ans.normal_modi_factor_w=res[29];
              })
              .catch(err => {
                this.$message.error(err);
              });
        },
        showModal1() {
          this.visible1 = true;
        },
        //点击ok
        handleOk1() {
          this.visible1 = false;
        },
        //点击cancel
        handleCancel1() {
          this.visible1 = false;
        },
        showModal2() {
          this.visible2 = true;
        },
        //点击ok
        handleOk2() {
          this.visible2 = false;
        },
        //点击cancel
        handleCancel2() {
          this.visible2 = false;
        },
        showModal3() {
          this.visible3 = true;
        },
        //点击ok
        handleOk3() {
          this.visible3 = false;
        },
        //点击cancel
        handleCancel3() {
          this.visible3 = false;
        },
        showModal4() {
          this.visible4 = true;
        },
        //点击ok
        handleOk4() {
          this.visible4 = false;
        },
        //点击cancel
        handleCancel4() {
          this.visible4 = false;
        },
        showModal5() {
          this.visible5 = true;
        },
        //点击ok
        handleOk5() {
          this.visible5 = false;
        },
        //点击cancel
        handleCancel5() {
          this.visible5 = false;
        },
        showModal6() {
          this.visible6 = true;
        },
        //点击ok
        handleOk6() {
          this.visible6 = false;
        },
        //点击cancel
        handleCancel6() {
          this.visible6 = false;
        },
        text1(){
          this.form.calculate_KV=0;
        },
        text2(){
          this.form.user_defined_KV=0;
        },
        text3(){
          this.form.calculate_KHb=0;
        },
        text4(){
          this.form.user_defined_KHb=0;
        },
        text5()
        {
          this.form.calculate_KHa=0;
        },
        text6()
        {
          this.form.user_defined_KHa=0;
        },
        text7()
        {
          this.form.calculate_KFb=0;
        },
        text8()
        {
          this.form.user_defined_KFb=0;
        },
        text9()
        {
          this.form.calculate_KFa=0;
        },
        text10()
        {
          this.form.user_defined_KFa=0;
        }
      },
  data()
  {
    return{
      visible1: false,
      visible2: false,
      visible3: false,
      visible4: false,
      visible5: false,
      visible6: false,
      items:[[]],
      form: this.$store.state.file.dataList[6],
      form2:{
        uuids:[],
      },
      ans:{
        flag:"",
        thickness_reduction_last_p:"",
        thickness_reduction_last_w:"",
        safe_F_damage_p_negative:"",
        safe_F_damage_w_negative:"",
        safe_H_damage_p_negative:"",
        safe_H_damage_w_negative:"",
        normal_modi_factor_w:"",
        safe_F_damage_p_positive:"",
        safe_H_damage_p_positive:"",
        safe_F_damage_w_positive:"",
        safe_H_damage_w_positive:"",
        K_V_vector_negative :"",
        K_Hb_vector_negative:"",
        K_Ha_vector_negative:"",
        K_Fb_vector_negative:"",
        K_Fa_vector_negative :"",
        K_V_vector_positive:"",
        K_Hb_vector_positive:"",
        K_Ha_vector_positive:"",
        K_Fb_vector_positive:"",
        K_Fa_vector_positive:"",
        K_V_vector_total:"",
        K_Hb_vector_total:"",
        K_Ha_vector_total:"",
        K_Fb_vector_total:"",
        K_Fa_vector_total:"",
        nn:"",
      },

    }
  }
}
</script>

<style scoped>
input
{
  text-align: center;
}
li{
  list-style-type: none;
}
.text4
{
  width:10%;

}
.text5
{
  width:1%;
}
.text6
{
  text-align: right;
  margin-top: 11%;
  margin-right: 3%;
  height:95%;
}
.text6 li
{
  height:11%;
}
.text7
{
  text-align: center;
  height: 100%;
  margin-left:8%;
}
.text7 li
{
  width:60%;
  height:11%;
  text-align: center;
}
.text7 li select
{
  width:100%;
  height:80%;
}
.text7 li input
{
  width:100%;
  height:80%;
}
.text8
{
  text-align: center;
  height:100%;
}
.text8 li
{
  width:60%;
  height:11%;
}
.text8 li select
{
  width:100%;
  height:80%;
}
.text8 li input
{
  width:100%;
  height:80%;
}
.text9
{
  height: 95%;
  text-align: right;
  margin-right: 3%;
  margin-top: 12%;
}
.text9 li
{
  margin-top: 0.5%;
  height: 6.6%;
}
.text10
{
  text-align: center;
  height:70%;
  margin-left: 5%;
}
.text10 li
{
  width:75%;
  height:9.5%;
}
.text10 li input
{
  width:75%;
  height:70%;
}
.text10 li select
{
  width:50%;
  height:75%;
}
.text11
{
  text-align: center;
  height:70%;
}
.text11 li
{
  width:75%;
  height:9.5%;
}
.text11 li input
{
  width:75%;
  height:70%;
}
.text11 li select
{
  width:50%;
  height:75%;
}
.text12
{
  text-align: right;
  margin-right:3% ;
  margin-top: 7%;
  height:95%;
}
.text12 li
{
  height:16.5%;
}
.text13
{
  height:95%;
  margin-top: 7%;
  text-align: center;
}
.text13 li
{
  height:16.5%;
  width:75%;
}
.text13 li input
{
  height:75%;
  width: 85%;
}
.text13 li select
{
  height:75%;
  width: 85%;
}
.text13 li span
{
  height:70%;
  width: 85%;
}
.text14
{
  width:90%;
  height:100%;
  text-align: right;
  margin-top: 5%;
  margin-right: 10%;
}
.text14 li
{
  height:15.5%;
}
.text15
{
  width:90%;
  height:100%;
  text-align: left;
  margin-top: 8%;
  margin-left: 5%;
}
.text15 li
{
  height:15%;
}
.text15 li input
{
  height:85%;
  width: 85%;
}
.text16
{
  height: 100%;
  width:95%;
  text-align: right;
  margin-top: 5%;
  margin-right: 5%;
}
.text16 li
{
  height:12%;
}
.text17
{
  width:90%;
  height:95%;
  text-align: left;
  margin-top: 8%;
  margin-left: 5%;
}
.text17 li
{
  height:12%;
  width:75%;
}
.text17 li input
{
  height:60%;
  width: 100%;
}
.text17 li select
{
  height:60%;
  width: 100%;
}
.text17 li span button
{
  margin-left: 5%;
}
.text18
{
  height: 100%;
  width:95%;
  text-align: right;
  margin-top: 12%;
}
.text18 li
{
  height:10%;
}
.text19
{
  height: 100%;
  width:95%;
  text-align: left;
}
.text19 li
{
  height:10%;
}
.text19 li input
{
  height:75%;
  width: 50%;
}
.text19 li button
{
  height:75%;
  width: 5%;
  background-color:#D7D7D7;
  border-radius: 4px;
  border: 2px #686868;

}
.text20
{
  height: 100%;
  width:95%;
  text-align: right;
  margin-top: 4%;
  margin-right: 5%;
}
.text20 li
{
  height:11%;
}
.text21
{
  width:90%;
  height:95%;
  text-align: left;
  margin-top: 4%;
  margin-left: 5%;
}
.text21 li
{
  height:12%;
}
.text22
{
  height:95%;
  margin-top: 7%;
  margin-left: 20%;
  text-align: center;
}
.text22 li
{
  height:30%;
  width:75%;
}
.text22 li input
{
  height:75%;
  width: 85%;
}
.text22 li select
{
  height:75%;
  width: 85%;
}
.text23
{
  text-align: right;
  margin-top: 7.5%;
  height:90%;
  width:100%;
  margin-left: 15%;
}
.text23 li
{
  height:40%;
}
.text24
{
  width:2%;
  font-size: 12px;
}
.text25
{
  height: 70%;
  width:80%;
}
.text25 li
{
  width: 110%;
  height:20%;
}
.text25 li span
{
  height:30%;
}
.text25 li button
{
  background-color:#D7D7D7;
  border-radius: 4px;
  border: 2px #686868;
  width:15%;
}
.text25 li span button
{
  background-color:#D7D7D7;
  border-radius: 4px;
  border: 2px #686868;
  width:80%;
}
.all{
  width: 100%;
  height: 100%;
}
.left_col
{
  width: 66.6%;
  height: 100%;
}
.left_col_1
{
  width: 98%;
  height:4%;
  margin-left: 1.5%;
  margin-top: 1%;
}
.left_col_2
{
  width: 100%;
  height:52.6%;
}
.left_col_2_1
{
  width:50%;
  height: 100%;
}
.left_col_2_1_1
{
  width:100%;
  height:40%;
}
.left_col_2_1_2
{
  width:95%;
  height:58%;
  margin-left: 3%;
}
.left_col_2_1_2_1
{
  width:100%;
  height:10%;
  font-size: 17.5px;
  background-color: #D7D7D7;
  border-radius: 3px;
  padding-left: 3%;
  font-weight: bolder;
}
.left_col_2_1_2_2
{
  width:100%;
  height:90%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
}
.left_col_2_1_2_2_1
{
  width:40%;
  height:100%;
}
.left_col_2_1_2_2_2
{
  width:30%;
  height:100%;
}
.left_col_2_1_2_2_3
{
  width:30%;
  height:100%;
}
.left_col_2_2
{
  width:50%;
  height: 95%;
  margin-top: 1%;
}
.left_col_2_2_1
{
  width:100%;
  height:7%;
  font-size: 17.5px;
  background-color: #D7D7D7;
  border-radius: 3px;
  padding-left: 3%;
  font-weight: bolder;
}
.left_col_2_2_2
{
  width:100%;
  height:93%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
}
.left_col_2_2_2_1
{
  width:40%;
  height: 100%;
}
.left_col_2_2_2_2
{
  width:30%;
  height: 100%;
}
.left_col_2_2_2_3
{
  width:30%;
  height: 100%;
}

.left_col_3
{
  width:98%;
  height:38%;
  margin-left: 1.5%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
}
.left_col_3_1
{
  width:100%;
  height:10%;
  font-size: 17.5px;
  background-color: #D7D7D7;
  border-radius: 3px;
  padding-left: 3%;
  font-weight: bolder;
}
.left_col_3_2
{
  width:100%;
  height:90%;
}
.left_col_3_2_1
{
  width: 25%;
  height:100%;
}
.left_col_3_2_1_1
{
  width:100%;
  height:60%;
}
.left_col_3_2_1_1_1
{
  width: 60%;
  height: 100%;
}
.left_col_3_2_1_1_2
{
  width:40%;
  height: 100%;
}
.left_col_3_2_1_2
{
  width:100%;
  height:40%;
}
.left_col_3_2_1_2_1
{
  width:100%;
  height: 75%;
}
.left_col_3_2_1_2_2
{
  width:100%;
  height:100%;
}
.left_col_3_2_2
{
  width: 18%;
  height:100%;
}
.left_col_3_2_3
{
  width: 10%;
  height:100%;
}
.left_col_3_2_4
{
  width: 15%;
  height:100%;
}
.left_col_3_2_5
{
  width: 20%;
  height:100%;
}
.left_col_3_2_6
{
  width: 13%;
  height:100%;
}
.right_col
{
  width:33.4%;
  height: 100%;
}
.right_col_1
{
  width:100%;
  height:50%;
}
.right_col_1_1
{
  width:95%;
  height:8.9%;
  font-size: 17.5px;
  background-color: #D7D7D7;
  border-radius: 3px;
  padding-left: 3%;
  font-weight: bolder;
  margin-top: 2%;
  margin-left: 2%;
}
.right_col_1_2
{
  width:95%;
  height:69%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
  margin-left: 2%;
}
.right_col_1_2_1
{
  width:40%;
  height:100%;
}
.right_col_1_2_2
{
  width:60%;
  height: 100%;
}
.right_col_1_3
{
  width:100%;
  height:10%;
}
.right_col_2
{
  width:100%;
  height:30%;
  margin-top: -9%;
}
.right_col_2_1
{
  width:95%;
  height:10%;
  font-size: 17.5px;
  background-color: #D7D7D7;
  border-radius: 3px;
  padding-left: 3%;
  font-weight: bolder;
  margin-left: 2%;
}
.right_col_2_2
{
  width:95%;
  height:90%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
  margin-left: 2%;
}
.right_col_2_2_1
{
  width:60%;
  height:100%;
}
.right_col_2_2_2
{
  width:40%;
  height: 100%;
  margin-top: 0.5%;
}
.right_col_3
{
  width:95%;
  height:20%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
  margin-top: 50%;
}
.text26
{
  width: 100%;
}
.text26 td
{
  width: 20.6%;
}
</style>